#[doc = "Register `TIMERS_RAWINTSTATUS` reader"]
pub struct R(crate::R<TIMERS_RAWINTSTATUS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<TIMERS_RAWINTSTATUS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<TIMERS_RAWINTSTATUS_SPEC>> for R {
    fn from(reader: crate::R<TIMERS_RAWINTSTATUS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Raw interrupt status of timer4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER4_RAW_INT_STATUS_A {
    #[doc = "0: The interrupt is invalid."]
    INVALID = 0,
    #[doc = "1: The interrupt is valid."]
    VALID = 1,
}
impl From<TIMER4_RAW_INT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER4_RAW_INT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `timer4_raw_int_status` reader - Raw interrupt status of timer4"]
pub struct TIMER4_RAW_INT_STATUS_R(crate::FieldReader<bool, TIMER4_RAW_INT_STATUS_A>);
impl TIMER4_RAW_INT_STATUS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TIMER4_RAW_INT_STATUS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER4_RAW_INT_STATUS_A {
        match self.bits {
            false => TIMER4_RAW_INT_STATUS_A::INVALID,
            true => TIMER4_RAW_INT_STATUS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TIMER4_RAW_INT_STATUS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TIMER4_RAW_INT_STATUS_A::VALID
    }
}
impl core::ops::Deref for TIMER4_RAW_INT_STATUS_R {
    type Target = crate::FieldReader<bool, TIMER4_RAW_INT_STATUS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw interrupt status of timer3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER3_RAW_INT_STATUS_A {
    #[doc = "0: The interrupt is invalid."]
    INVALID = 0,
    #[doc = "1: The interrupt is valid."]
    VALID = 1,
}
impl From<TIMER3_RAW_INT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER3_RAW_INT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `timer3_raw_int_status` reader - Raw interrupt status of timer3"]
pub struct TIMER3_RAW_INT_STATUS_R(crate::FieldReader<bool, TIMER3_RAW_INT_STATUS_A>);
impl TIMER3_RAW_INT_STATUS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TIMER3_RAW_INT_STATUS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER3_RAW_INT_STATUS_A {
        match self.bits {
            false => TIMER3_RAW_INT_STATUS_A::INVALID,
            true => TIMER3_RAW_INT_STATUS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TIMER3_RAW_INT_STATUS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TIMER3_RAW_INT_STATUS_A::VALID
    }
}
impl core::ops::Deref for TIMER3_RAW_INT_STATUS_R {
    type Target = crate::FieldReader<bool, TIMER3_RAW_INT_STATUS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw interrupt status of timer2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER2_RAW_INT_STATUS_A {
    #[doc = "0: The interrupt is invalid."]
    INVALID = 0,
    #[doc = "1: The interrupt is valid."]
    VALID = 1,
}
impl From<TIMER2_RAW_INT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER2_RAW_INT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `timer2_raw_int_status` reader - Raw interrupt status of timer2"]
pub struct TIMER2_RAW_INT_STATUS_R(crate::FieldReader<bool, TIMER2_RAW_INT_STATUS_A>);
impl TIMER2_RAW_INT_STATUS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TIMER2_RAW_INT_STATUS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER2_RAW_INT_STATUS_A {
        match self.bits {
            false => TIMER2_RAW_INT_STATUS_A::INVALID,
            true => TIMER2_RAW_INT_STATUS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TIMER2_RAW_INT_STATUS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TIMER2_RAW_INT_STATUS_A::VALID
    }
}
impl core::ops::Deref for TIMER2_RAW_INT_STATUS_R {
    type Target = crate::FieldReader<bool, TIMER2_RAW_INT_STATUS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Raw interrupt status of timer1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER1_RAW_INT_STATUS_A {
    #[doc = "0: The interrupt is invalid."]
    INVALID = 0,
    #[doc = "1: The interrupt is valid."]
    VALID = 1,
}
impl From<TIMER1_RAW_INT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER1_RAW_INT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `timer1_raw_int_status` reader - Raw interrupt status of timer1"]
pub struct TIMER1_RAW_INT_STATUS_R(crate::FieldReader<bool, TIMER1_RAW_INT_STATUS_A>);
impl TIMER1_RAW_INT_STATUS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TIMER1_RAW_INT_STATUS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER1_RAW_INT_STATUS_A {
        match self.bits {
            false => TIMER1_RAW_INT_STATUS_A::INVALID,
            true => TIMER1_RAW_INT_STATUS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TIMER1_RAW_INT_STATUS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TIMER1_RAW_INT_STATUS_A::VALID
    }
}
impl core::ops::Deref for TIMER1_RAW_INT_STATUS_R {
    type Target = crate::FieldReader<bool, TIMER1_RAW_INT_STATUS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 3 - Raw interrupt status of timer4"]
    #[inline(always)]
    pub fn timer4_raw_int_status(&self) -> TIMER4_RAW_INT_STATUS_R {
        TIMER4_RAW_INT_STATUS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Raw interrupt status of timer3"]
    #[inline(always)]
    pub fn timer3_raw_int_status(&self) -> TIMER3_RAW_INT_STATUS_R {
        TIMER3_RAW_INT_STATUS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Raw interrupt status of timer2"]
    #[inline(always)]
    pub fn timer2_raw_int_status(&self) -> TIMER2_RAW_INT_STATUS_R {
        TIMER2_RAW_INT_STATUS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Raw interrupt status of timer1"]
    #[inline(always)]
    pub fn timer1_raw_int_status(&self) -> TIMER1_RAW_INT_STATUS_R {
        TIMER1_RAW_INT_STATUS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
}
#[doc = "TIMERS_RAWINTSTATUS is the raw interrupt status register for timers.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [timers_rawintstatus](index.html) module"]
pub struct TIMERS_RAWINTSTATUS_SPEC;
impl crate::RegisterSpec for TIMERS_RAWINTSTATUS_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [timers_rawintstatus::R](R) reader structure"]
impl crate::Readable for TIMERS_RAWINTSTATUS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets TIMERS_RAWINTSTATUS to value 0"]
impl crate::Resettable for TIMERS_RAWINTSTATUS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
